Skip to content

ci: repair envtest setup so the Checks test job passes - #758

Merged
robnester-rh merged 1 commit into
enterprise-contract:mainfrom
robnester-rh:EC-2167
Aug 31, 2026
Merged

ci: repair envtest setup so the Checks test job passes#758
robnester-rh merged 1 commit into
enterprise-contract:mainfrom
robnester-rh:EC-2167

Conversation

@robnester-rh

Copy link
Copy Markdown
Contributor

Problem

make test fails for every PR (the required Checks job): it resolves
KUBEBUILDER_ASSETS="" and TestAPIs panics with
exec: "etcd": executable file not found in $PATH.

Root cause (reproduced locally): setup-envtest was pinned to a Nov 2022
version that lists/downloads envtest binaries from the retired
kubebuilder-tools GCS bucket, which now returns 401 Unauthorized. Also
ENVTEST_K8S_VERSION was unset.

Fix

  • Bump setup-envtest in tools/go.mod to a current version that uses the
    GitHub-based envtest binary index.
  • Set ENVTEST_K8S_VERSION ?= 1.29.0 in the Makefile (matches the controller's
    k8s.io/api v0.29).

Change is confined to the tools build module + Makefile; the main module is
untouched and the go directive is unchanged (1.23.6).

Verification

Locally: setup-envtest use 1.29.0 -p path now provisions etcd/kube-apiserver,
and go test ./controllers/...ok (TestAPIs passes). This PR's own Checks
run is the CI confirmation.

Unblocks the EC-2130 SHA-pinning PR (#757), which was blocked by this required
check.

Ref: EC-2167

setup-envtest was pinned to a Nov 2022 version that fetches envtest
binaries from the retired kubebuilder-tools GCS bucket, which now returns
401 Unauthorized. As a result `make test` resolved KUBEBUILDER_ASSETS=""
and TestAPIs panicked with `etcd: executable file not found in $PATH`.
ENVTEST_K8S_VERSION was also unset.

Bump setup-envtest (tools/go.mod) to a current version that uses the
GitHub-based envtest binary index, and set ENVTEST_K8S_VERSION to 1.29.0
to match the controller's k8s.io/api version. Verified locally: envtest
provisions etcd and `go test ./controllers/...` passes.

Co-Authored-By: Claude <noreply@anthropic.com>
Ref: EC-2167
@codecov-commenter

codecov-commenter commented Aug 27, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.66%. Comparing base (46c4552) to head (ec63688).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #758   +/-   ##
=====================================
  Coverage   0.66%   0.66%           
=====================================
  Files          6       6           
  Lines        301     301           
=====================================
  Hits           2       2           
  Misses       299     299           
Flag Coverage Δ
api 0.76% <ø> (ø)
controller 0.00% <ø> (ø)
schema 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@robnester-rh
robnester-rh merged commit 025fa15 into enterprise-contract:main Aug 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants